﻿
namespace BLPicker.OnTheFly.Tools
{
    using System;
    using BLPicker;

    public class BusinessLayerProxyActivator
    {

        public TBusinessLayerInterface CreateBusinessLayerProxyInstance<TBusinessLayerInterface>(
            Type businessLayerProxyType,
            IBusinessLayerFactory<TBusinessLayerInterface> businessLayerFactory)
        {
            TBusinessLayerInterface proxyInstance = (TBusinessLayerInterface)Activator.CreateInstance(businessLayerProxyType, businessLayerFactory);
            return proxyInstance;
        }

        public TBusinessLayerInterface CreateBusinessLayerProxyInstance<TBusinessLayerInterface>(
            Type businessLayerProxyType,
            IBusinessLayerFactory<TBusinessLayerInterface> businessLayerFactory,
            uint inheritanceLevel)
        {
            TBusinessLayerInterface proxyInstance = (TBusinessLayerInterface)Activator.CreateInstance(businessLayerProxyType, businessLayerFactory);
            return proxyInstance;
        }

    }
}
